package com.xiyu.service.vo.office.space.baseVO;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import jakarta.validation.constraints.*;
import org.hibernate.validator.constraints.*;

import java.math.BigDecimal;

/**
 * 办公用房 Base VO，提供给添加、修改、详细的子 VO 使用
 * 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
 */
@Data
public class OfficeSpaceBase {

    @Schema(description = "办公用房ID")
    private Long buildingId;

    @Schema(description = "办公用房单元ID")
    private Long buildingUnitId;

    @Schema(description = "办公用房楼层ID")
    private Long buildingFloorId;

    @Schema(description = "单位ID")
    private Long unitId;

    @Schema(description = "类型")
    @Range(max = 127, message = "最大不能超过127")
    private Integer type;

    @Schema(description = "名称")
    @Size(max = 50, message = "长度不能超过50")
    private String name;

    @Schema(description = "房号")
    @Size(max = 50, message = "长度不能超过50")
    private String number;

    @Schema(description = "状态")
    @Range(max = 127, message = "最大不能超过127")
    private Integer status;

    @Schema(description = "备注")
    @Size(max = 1024, message = "长度不能超过1024")
    private String remark;

    @Schema(description = "面积")
    @DecimalMax(value = "10000000000", message = "面积最大不能超过10000000000")
    private BigDecimal area;

}
